<?php

namespace backend\models\odm;

use Yii;

/**
 * This is the model class for table "xs_recharge".
 *
 * @property string $id
 * @property string $sn
 * @property integer $status
 * @property string $pay_type
 * @property integer $user_id
 * @property string $pay_money
 * @property string $read_coin
 * @property string $order_time
 * @property string $pay_time
 * @property string $remark
 */
class RechargeOdm extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'xs_recharge';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['status', 'user_id'], 'integer'],
            [['pay_type'], 'required'],
            [['pay_money', 'read_coin'], 'number'],
            [['order_time', 'pay_time'], 'safe'],
            [['sn'], 'string', 'max' => 60],
            [['pay_type'], 'string', 'max' => 20],
            [['remark'], 'string', 'max' => 200],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', '充值记录id'),
            'sn' => Yii::t('app', '第三方充值订单号'),
            'status' => Yii::t('app', '充值状态，0为待付款，1为已付款'),
            'pay_type' => Yii::t('app', '充值方式[1支付宝 2微信 3银联 4其他]'),
            'user_id' => Yii::t('app', '充值用户id'),
            'pay_money' => Yii::t('app', '充值金额'),
            'read_coin' => Yii::t('app', '充值阅币数'),
            'order_time' => Yii::t('app', '下单时间'),
            'pay_time' => Yii::t('app', '支付时间'),
            'remark' => Yii::t('app', '备注'),
        ];
    }
}
